﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Configuration;
using Common.Forms;

namespace Starter
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Common.Properties.Settings.Default.ConnectionString = String.Format("Data Source={0};Initial Catalog=DigiSkola;User Id=sa;Password=malaVenecija",ConfigurationManager.AppSettings["SqlServer"]);

            using (Login login = new Login())
            {
                if (login.ShowDialog() == DialogResult.OK)
                {
                    // učitava se komplet rečnik za izabrani jezik
                    Common.MultiLanguage.Tool.RecnikCeo = Common.MultiLanguage.Tool.UcitajPrevode(Common.Properties.Settings.Default.JezikId);
                    Application.Run(new Starter());
                }
            }
        }
    }
}
